﻿@model System.Data.DataTable
@if (Model != null)
{
    <div class="thietbi_title">
        @for (int i = 0; i < Model.Rows.Count; i++)
        {
            if (i == 0 && Model.Rows[i]["PageId"].ToString().Equals(ViewBag.IdPage))
            {
                <a data-ajax="true" data-ajax-method="Get" data-ajax-mode="replace" data-ajax-update="#load_tab" href="@Url.Action("Mota", "ThietBi", new { id = Model.Rows[i]["PageId"].ToString() })">
                     <div class="thietbi_title_curbegin">
                        @Model.Rows[i]["Name"].ToString()
                    </div>
                </a>
            }
            else if (i == 0 && !Model.Rows[i]["PageId"].ToString().Equals(ViewBag.IdPage))
            {
                <a data-ajax="true" data-ajax-method="Get" data-ajax-mode="replace" data-ajax-update="#load_tab" href="@Url.Action("Mota", "ThietBi", new { id = Model.Rows[i]["PageId"].ToString() })">
                     <div class="thietbi_title_notcurmid">
                        @Model.Rows[i]["Name"].ToString()
                    </div>
                </a>
            }
            else if (Model.Rows[i]["PageId"].ToString().Equals(ViewBag.IdPage))
            {
                <a data-ajax="true" data-ajax-method="Get" data-ajax-mode="replace" data-ajax-update="#load_tab" href="@Url.Action("Mota", "ThietBi", new { id = Model.Rows[i]["PageId"].ToString() })">
                     <div class="thietbi_title_curmid">
                        @Model.Rows[i]["Name"].ToString()
                    </div>
                </a>  
            }
            else
            {
                <a data-ajax="true" data-ajax-method="Get" data-ajax-mode="replace" data-ajax-update="#load_tab" href="@Url.Action("Mota", "ThietBi", new { id = Model.Rows[i]["PageId"].ToString() })">
                     <div class="thietbi_title_notcurmid">
                        @Model.Rows[i]["Name"].ToString()
                    </div>
                </a>
            }

        }
    </div>
}
